package com.guw.AWT;

import java.awt.*;

public class TestBorderLayout {
    public static void main(String[] args) {
        Frame frame = new Frame("测试");
        //frame.setLayout(new BorderLayout());

        Button button1 = new Button("east");
        Button button2 = new Button("west");
        Button button3 = new Button("south");
        Button button4 = new Button("north");
        Button button5 = new Button("center");

        //
        frame.add(button1,BorderLayout.EAST);
        frame.add(button2,BorderLayout.WEST);
        frame.add(button3,BorderLayout.SOUTH);
        frame.add(button4,BorderLayout.NORTH);
        frame.add(button5,BorderLayout.CENTER);


        frame.setBounds(100,100,400,400);
        frame.setVisible(true);






    }
}
